<template>
  <div class="mod-config">
    <table-view ref="view"
                :searchAttrs="searchAttrs"
                :primaryKey="primaryKey"
                :listApiName="listApiName"
                :exportApiName="exportApiName"
                :showAttrs="showAttrs"
                :sumInfo='sumInfo'

    >
    </table-view>
  </div>
</template>


<script>
  import tableView from '@/components/tableView'
  import basicMixins from '@/utils/commonViewMixins'

  export default {
    mixins: [basicMixins],
    data() {
      return {
        primaryKey: 'id',
        listApiName: 'weighApi/getQueryWeighPageStatistical',
        exportApiName: 'weighApi/exportClientStatisticalWeighDetailInfo',
        searchAttrs: {
          clientId: {
            label: "客户",
            placeholder: "请输入客户",
            type: 'autoComplete',
            querySearchApiName: 'clientApi/getClientList'
          },
/*          sysDictId: {
            label: "货物名称",
            placeholder:"请输入货物名称",
            type: 'autoComplete',
            querySearchApiName: 'systemApi/getSysDictInfoList'
          },*/
          dateTimeRange: {
            type: 'date',
            label: '时间范围',
            dateType: 'datetimerange',
            defaultTime: ['06:00:00', '08:00:00'],
            clearable: true
          },
          type: {
            type: 'func',
            dataFunc: () => {
              return 0
            }
          }
        },
        sumInfo: {licensePateCount: 'licensePateCount',weightSettleAmount: 'weightSettleAmount'},
        showAttrs: {
          sysDictName: {
            label: "货物名称"
          },
          clientName: {
            label: "客户"
          },
          licensePateCount: {
            label: "车次"
          },
          weightSettleAmount:{
            label: "结算重量",
            type: 'tag'
          }
        }
      }
    },
    components: {
      tableView
    }
  }
</script>
